<template>
  <div>
    <BackTop />
    <MyNav id="nav"/>
    <div id="content">
      <keep-alive exclude="User,CDetail,VDetail" >
        <router-view />
      </keep-alive>
    </div>
  </div>
</template>

<script lang="ts">
import Vue from 'vue';
import BackTop from './components/BackTop/BackTop.vue'
import MyNav from './components/MyNav.vue';
export default Vue.extend({
  name: 'App',
  data: () => ({
    //
  }),
  mounted() {
    let content = document.getElementById('content') as HTMLElement
    let nav = document.getElementById('nav') as HTMLElement
    content.style.marginTop  = nav.offsetHeight + 'px'
    this.$store.dispatch('user/getUserInfo')
  },
  components: {
    MyNav,
    BackTop
  }
});
</script>

<style lang="scss">
</style>
